package com.it.filter;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebFilter;

import java.io.IOException;

//@WebFilter(urlPatterns = "/*")
public class AbcFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        //拦截到请求，就调用该方法
        System.out.println("Abc拦截方法执行，拦截到了请求...");

        filterChain.doFilter(servletRequest, servletResponse);

        System.out.println("Abc拦截到了请求，放行后逻辑...");
    }
}
